package com.rd.student.dashuju.zhengruixian.test0803;

public class getMax1 {
    public static void main(String[] args) {

        int[] arr={3, 6, 4, 8, 10, 9};
        int max=getMax(arr);


        System.out.println(max);

    }

    public   static int getMax (int[] arr) {

        int max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
            }
        }
        return max;
    }





    }
